#pragma once

#include "EditWidget.hpp"
#include "Glyph.hpp"
#include "GeneratedFiles/ui/ui_GlyphWidget.h"

#define slots




class GlyphWidget : public EditWidget
{
	Q_OBJECT

private:

	Ui::GlyphWidget   ui;

	AdvancedGlyph&            m_glyph;

public:

	GlyphWidget(AdvancedGlyph& glyph, QAbstractItemView* itemView, const QModelIndex& index);

	void setReadOnly(bool b);



	/**
	 * When called, a subclass must apply all the changes made to the actual data.
	 */
	void apply() const;

	/**
	 * When called, a subclass must fetch all data from the original data (thus everything
	 * done since the last apply() is lost.
	 */
	void discard();

	bool hasChanged() const;

private slots:

	void onNameChanged();
};
///////////////////////////////////////////////////////////////////////////////////////////////////
